package com.ty.controller;

import cn.hutool.core.util.StrUtil;
import com.netflix.loadbalancer.AvailabilityFilteringRule;
import com.ty.feignclients.BaiduClient;
import com.ty.feignclients.NacosAClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("/api")
public class BController {

    @Autowired
    private NacosAClient nacosAClient;

    @Autowired
    private BaiduClient baiduClient;


    @GetMapping("/b")
    public String test(){
        String test = nacosAClient.test();
        return test;
    }

    @GetMapping("/baidu")
    public String test2(){
        String test2 = baiduClient.home();
        return test2;
    }


}
